Next | Prev | Up | Top | Contents | Index

Example 2: A Striped, Plexed Logical Volume

This example shows the noninteractive creation of a logical volume from four equal-sized option disks (controller 0, units 2 through 5). Two plexes will be created with the data striped across the two disks in each plex. The stripe unit will be 128 KB. An XFS filesystem is created and mounted at /vol1.

  1. As in the previous example, unmount filesystems on the disks to be used, if necessary.

  2. Create a file, called xlv0.specs for example, that contains input for xlv_make. For this example and a volume named xlv0, the file contains:

    vol xlv0

    data

    plex

    ve -stripe -stripe_unit 256 dks0d2s7 dks0d3s7

    plex

    ve -stripe -stripe_unit 256 dks0d4s7 dks0d5s7

    end

    show

    exit

    This script specifies the volume hierarchically: volume, subvolume (data), first plex with a striped volume element, then second plex with a striped volume element. The ve commands have a stripe unit argument of 256. This argument is the number of 512-byte disk blocks (sectors), so 128K/512 = 256. The end command signifies that the specification is complete and the (optional) show command causes the specification to be displayed. The logical volume label is created by the exit command.

  3. Run xlv_make to create the volume. For example:

    # xlv_make xlv0.specs

  4. Make an XFS filesystem with an internal 10 MB log and 1 KB block size:

    # mkfs -b size=1k -l size=10m /dev/dsk/xlv/xlv0

  5. Mount the filesystem, for example:

    # mkdir /vol1

    # mount /dev/dsk/xlv/xlv0 /vol1

  6. To have the logical volume mounted automatically at system startup, add an entry for the volume to /etc/fstab, for example:

    /dev/dsk/xlv/xlv0 /vol1 xfs rw,raw=/dev/rdsk/xlv/xlv0 0 0


Next | Prev | Up | Top | Contents | Index